import http from "@/utils/http.js"

const url = {
    /****************** 排班接口 *********************/
    // 生成排班,按部门 起止时间 均为必填 depId,startTime,endTime
    workPlanBuildWorkPlan: "/workPlan/buildWorkPlan",
    // 导出调班记录
    workPlanExportAdjustmentRecord: "/workPlan/exportAdjustmentRecord",
    // 导出排班记录
    workPlanExportUserWorkPlan: "/workPlan/exportUserWorkPlan",
    // 查询调班记录
    workPlanQueryAdjustmentRecordPage: "/workPlan/queryAdjustmentRecordPage",
    // 查询排班记录
    workPlanQueryUserWorkPlanPage: "/workPlan/queryUserWorkPlanPage",
    // 调班 单人
    workPlanUpdateUserWorkPlan: "/workPlan/updateUserWorkPlan",

    /****************** 排班计划接口 *********************/
    // 新增排班计划
    workSchedulePlanAddWorkSchedulePlan: "/workSchedulePlan/addWorkSchedulePlan",
    // 删除排班计划
    workSchedulePlanDelWorkSchedulePlan: "/workSchedulePlan/delWorkSchedulePlan",
    // 查询排班计划
    workSchedulePlanQueryWorkSchedulePlan: "/workSchedulePlan/queryWorkSchedulePlan",
    // 修改排班计划
    workSchedulePlanUpdateWorkSchedulePlan: "/workSchedulePlan/updateWorkSchedulePlan",

    /****************** 日历接口 *********************/
    // 生成日历，按年
    workcalendarGeneratCalendar: "/workcalendar/generatCalendar",
    // 查询指定年月日历,按年,月
    workcalendarGetWorkCalendar: "/workcalendar/getWorkCalendar",
    // 查询指定年月日历,时间范围
    workcalendarGetWorkCalendarByTime: "/workcalendar/getWorkCalendarByTime",

    /****************** 班次管理接口 *********************/
    // 新增班次
    workClassAddWorkClass: "/workClass/addWorkClass",
    // 删除班次
    workClassDelWorkClass: "/workClass/delWorkClass",
    // 查询班次
    workClassQueryWorkClass: "/workClass/queryWorkClass",
    // 查询班次
    workClassQueryWorkTeamsDetail: "/workClass/queryWorkClassDetail/",
    // 修改班次
    workClassUpdateWorkClass: "/workClass/updateWorkClass",

    /****************** 班组管理接口 *********************/
    // 新增班组
    workteamsAddWorkTeams: "/workteams/addWorkTeams",
    // 删除班组
    workteamsDelWorkTeams: "/workteams/delWorkTeams",
    // 查询班组
    workteamsQueryWorkTeams: "/workteams/queryWorkTeams",
    // 查询班组
    workteamsQueryWorkTeamsDetail: "/workteams/queryWorkTeamsDetail/",
    // 修改班组
    workteamsUpdateWorkTeams: "/workteams/updateWorkTeams",

    /****************** 巡检计划接口 *********************/
    // 查询巡检计划
    inspectionPlanQueryPlan: "/inspectionPlan/queryPlan",
    // 编辑巡检计划
    inspectionPlanEditPlan: "/inspectionPlan/editPlan",
    // 新增巡检计划
    inspectionPlanAddPlan: "/inspectionPlan/addPlan",
    // 删除巡检计划
    inspectionPlanDeletePlan: "/inspectionPlan/deletePlan/",
    // 查心巡检计划详情
    inspectionPlanGetById: "/inspectionPlan/getById/",

    /****************** 巡检任务接口 *********************/
    // 查询巡检任务
    inspTaskQueryTask: "/inspTask/queryTask",
    // 查询巡检记录
    inspTaskQueryInspRecord: "/inspTask/queryInspRecord",
    // 调整巡检任务
    inspTaskAdjustTask: "/inspTask/adjustTask",
    // 确认任务
    inspTaskConfirmTask: "/inspTask/confirmTask",
    // 填报任务
    inspTaskReportTask: "/inspTask/reportTask",
    // 保存任务
    inspTaskSaveTask: "/inspTask/saveTask",
    // 巡检统计
    inspTaskStatistics: "/inspTask/statistics",
    // 查询任务填报项目
    inspTaskQueryItems: "/inspTask/queryItems/",
    // 查询任务填报项目
    inspTaskUpload: "/inspTask/upload",
    // 任务更新
    inspTaskUpdateTask: "/inspTask/updateTask",

    /****************** 操作记录接口 *********************/
    // 查询操作记录
    operationRecordsQueryOperationRecords: "/operationRecords/queryOperationRecords",
    // 查询操作记录
    operationRecordsQueryRecords: "/operationRecords/queryRecords/",

    /****************** 文件管理接口 *********************/
    // 上传图片
    fileInfoUpload: "/fileInfo/upload",
    // 获取图片
    fileInfoGetByIds: "/fileInfo/getByIds/",

    // 自由排班
    flexibleUserWorkPlanBatch: "/workPlan/flexibleUserWorkPlanBatch",
    // 自由排班记录
    queryFlexibleUserWorkPlanHis: "/workPlan/queryFlexibleUserWorkPlanHis",

    /****************** 日常任务接口 *********************/
    // 列表查询
    dailyTaskQueryTask: "/dailyTask/queryTask",
    // 获取详情
    dailyTaskGetById: "/dailyTask/getById/",
    // 编辑任务
    dailyTaskEditTask: "/dailyTask/editTask",
    // 发布任务
    dailyTaskPublish: "/dailyTask/publish",
    // 任务填报
    dailyTaskReportDailyTask: "/dailyTask/reportDailyTask",
    // 任务填报详情
    dailyTaskReportDailyTaskDetail: "/dailyTask/reportDailyTaskList/",
    // 任务填报详情
    dailyTaskRemoveTask: "/dailyTask/removeTask/",

    /****************** 交接班接口 *********************/
    // 交接班记录
    // 列表查询
    handoverRecordRecordList: "/handoverRecord/recordList",
    // 获取详情
    handoverRecordGetById: "/handoverRecord/getById/",
    // 保存
    handoverRecordSaveRecord: "/handoverRecord/saveRecord",
    // 交班
    handoverRecordSubmitRecord: "/handoverRecord/submitRecord",
    // 接班
    handoverRecordToConfirm: "/handoverRecord/toConfirm/",
    // 交班
    handoverTaskSubmitRecord: "/handoverRecord/submitRecord",
    // 保存
    handoverTaskSaveRecord: "/handoverRecord/saveRecord",
    // 接班
    handoverTaskToConfirm: "/handoverRecord/toConfirm/",

    // 交接班任务
    // 调整
    handoverTaskAdjustTask: "/handoverTask/adjustTask",
    // 列表查询
    handoverTaskQueryTaskList: "/handoverTask/queryTaskList",
    // 填报
    handoverTaskReportTask: "/handoverTask/reportTask",

}

export default {
    url: url,
    /****************** 排班接口 *********************/
    // 生成排班,按部门 起止时间 均为必填 depId,startTime,endTime
    workPlanBuildWorkPlan(params) {
        return http.post(url.workPlanBuildWorkPlan, params)
    },
    // 导出调班记录
    workPlanExportAdjustmentRecord(params) {
        return http.export(url.workPlanExportAdjustmentRecord, params, 'post')
    },
    // 导出排班记录
    workPlanExportUserWorkPlan(params) {
        return http.export(url.workPlanExportUserWorkPlan, params, 'post')
    },
    // 查询调班记录
    workPlanQueryAdjustmentRecordPage(params) {
        return http.post(url.workPlanQueryAdjustmentRecordPage, params)
    },
    // 查询排班记录
    workPlanQueryUserWorkPlanPage(params) {
        return http.post(url.workPlanQueryUserWorkPlanPage, params)
    },
    // 调班 单人
    workPlanUpdateUserWorkPlan(params) {
        return http.post(url.workPlanUpdateUserWorkPlan, params)
    },

    /****************** 排班计划接口 *********************/
    // 新增排班计划
    workSchedulePlanAddWorkSchedulePlan(params) {
        return http.post(url.workSchedulePlanAddWorkSchedulePlan, params)
    },
    // 删除排班计划
    workSchedulePlanDelWorkSchedulePlan(params) {
        return http.post(url.workSchedulePlanDelWorkSchedulePlan, params)
    },
    // 查询排班计划
    workSchedulePlanQueryWorkSchedulePlan(params) {
        return http.post(url.workSchedulePlanQueryWorkSchedulePlan, params)
    },
    // 修改排班计划
    workSchedulePlanUpdateWorkSchedulePlan(params) {
        return http.post(url.workSchedulePlanUpdateWorkSchedulePlan, params)
    },

    /****************** 日历接口 *********************/
    // 生成日历，按年
    workcalendarGeneratCalendar(params) {
        return http.post(url.workcalendarGeneratCalendar + `?year=${params.year}`)
    },
    // 查询指定年月日历,按年,月
    workcalendarGetWorkCalendar(params) {
        return http.post(url.workcalendarGetWorkCalendar + `?year=${params.year}&month=${params.month}`)
    },
    // 查询指定年月日历,按年,月
    workcalendarGetWorkCalendarByTime(params) {
        return http.post(url.workcalendarGetWorkCalendarByTime + `?startTime=${params.startTime}&endTime=${params.endTime}`)
    },

    /****************** 班次管理接口 *********************/
    // 新增班次
    workClassAddWorkClass(params) {
        return http.post(url.workClassAddWorkClass, params)
    },
    // 删除班次
    workClassDelWorkClass(params) {
        return http.post(url.workClassDelWorkClass, params)
    },
    // 查询班次
    workClassQueryWorkClass(params) {
        return http.post(url.workClassQueryWorkClass, params)
    },
    // 查询班次
    workClassQueryWorkTeamsDetail(params) {
        return http.post(url.workClassQueryWorkTeamsDetail + `${params.id}`)
    },
    // 修改班次
    workClassUpdateWorkClass(params) {
        return http.post(url.workClassUpdateWorkClass, params)
    },

    /****************** 班组管理接口 *********************/
    // 新增班组
    workteamsAddWorkTeams(params) {
        return http.post(url.workteamsAddWorkTeams, params)
    },
    // 删除班组
    workteamsDelWorkTeams(params) {
        return http.post(url.workteamsDelWorkTeams, params)
    },
    // 查询班组
    workteamsQueryWorkTeams(params) {
        return http.post(url.workteamsQueryWorkTeams, params)
    },
    // 查询班组
    workteamsQueryWorkTeamsDetail(params) {
        return http.post(url.workteamsQueryWorkTeamsDetail + `${params.id}`)
    },
    // 修改班组
    workteamsUpdateWorkTeams(params) {
        return http.post(url.workteamsUpdateWorkTeams, params)
    },
    /****************** 巡检计划接口 *********************/
    // 查询巡检计划
    inspectionPlanQueryPlan(params) {
        return http.post(url.inspectionPlanQueryPlan, params)
    },
    // 修改巡检计划
    inspectionPlanEditPlan(params) {
        return http.post(url.inspectionPlanEditPlan, params)
    },
    // 新增巡检计划
    inspectionPlanAddPlan(params) {
        return http.post(url.inspectionPlanAddPlan, params)
    },
    // 删除巡检计划
    inspectionPlanDeletePlan(params) {
        return http.delete(url.inspectionPlanDeletePlan + `${params.id}`)
    },
    // 查询巡检计划详情
    inspectionPlanGetById(params) {
        return http.get(url.inspectionPlanGetById + `${params.id}`)
    },
    /****************** 巡检任务接口 *********************/
    // 查询巡检任务
    inspTaskQueryTask(params) {
        return http.post(url.inspTaskQueryTask, params)
    },
    // 查询巡检记录
    inspTaskQueryInspRecord(params) {
        return http.post(url.inspTaskQueryInspRecord, params)
    },
    // 调整巡检任务
    inspTaskAdjustTask(params) {
        return http.post(url.inspTaskAdjustTask, params)
    },
    // 确认任务
    inspTaskConfirmTask(params) {
        return http.post(url.inspTaskConfirmTask, params)
    },
    // 填报任务
    inspTaskReportTask(params) {
        return http.post(url.inspTaskReportTask, params)
    },
    // 保存任务
    inspTaskSaveTask(params) {
        return http.post(url.inspTaskSaveTask, params)
    },
    // 巡检统计
    inspTaskStatistics(params) {
        return http.post(url.inspTaskStatistics, params)
    },
    // 查询任务填报项目
    inspTaskQueryItems(params) {
        return http.post(url.inspTaskQueryItems + params.id, 'formData')
    },
    // 查询巡检计划详情
    inspTaskUpload(params) {
        return http.post(url.inspTaskUpload, params, 'formData')
    },
    // 查询巡检计划详情
    inspTaskUpdateTask(params) {
        return http.post(url.inspTaskUpdateTask, params)
    },

    /****************** 操作记录接口 *********************/
    // 操作记录
    operationRecordsQueryOperationRecords(params) {
        return http.post(url.operationRecordsQueryOperationRecords, params)
    },
    // 操作记录
    operationRecordsQueryRecords(params) {
        return http.post(url.operationRecordsQueryRecords + params.id)
    },

    /****************** 文件管理接口 *********************/
    // 上传图片
    fileInfoUpload(params) {
        return http.post(url.fileInfoUpload, params, 'formData')
    },
    // 获取图片
    fileInfoGetByIds(params) {
        return http.post(url.fileInfoGetByIds + params)
    },


    // 自由排班
    flexibleUserWorkPlanBatch(params) {
        return http.post(url.flexibleUserWorkPlanBatch, params)
    },
    // 自由排班记录
    queryFlexibleUserWorkPlanHis(params) {
        return http.post(url.queryFlexibleUserWorkPlanHis, params)
    },

    /****************** 日常任务接口 *********************/
    // 列表查询
    dailyTaskQueryTask(params) {
        return http.post(url.dailyTaskQueryTask, params)
    },
    // 列表查询
    dailyTaskGetById(params) {
        return http.post(url.dailyTaskGetById + params.id)
    },
    // 编辑任务
    dailyTaskEditTask(params) {
        return http.post(url.dailyTaskEditTask, params)
    },
    // 发布任务
    dailyTaskPublish(params) {
        return http.post(url.dailyTaskPublish, params)
    },
    // 任务填报
    dailyTaskReportDailyTask(params) {
        return http.post(url.dailyTaskReportDailyTask, params)
    },
    // 任务填报
    dailyTaskReportDailyTaskDetail(params) {
        return http.post(url.dailyTaskReportDailyTaskDetail + params.id)
    },
    // 删除任务
    dailyTaskRemoveTask(params) {
        return http.post(url.dailyTaskRemoveTask + params.id)
    },

    /****************** 交接班接口 *********************/
    // 交接班记录
    // 列表查询
    handoverRecordRecordList(params) {
        return http.post(url.handoverRecordRecordList, params)
    },
    // 获取详情
    handoverRecordGetById(params) {
        return http.post(url.handoverRecordGetById + params.id)
    },
    // 保存
    handoverRecordSaveRecord(params) {
        return http.post(url.handoverRecordSaveRecord, params)
    },
    // 交班
    handoverRecordSubmitRecord(params) {
        return http.post(url.handoverRecordSubmitRecord, params)
    },
    // 接班
    handoverRecordToConfirm(params) {
        return http.post(url.handoverRecordToConfirm + params.id)
    },

    // 交接班任务
    // 调整
    handoverTaskAdjustTask(params) {
        return http.post(url.handoverTaskAdjustTask, params)
    },
    // 列表查询
    handoverTaskQueryTaskList(params) {
        return http.post(url.handoverTaskQueryTaskList, params)
    },
    // 填报
    handoverTaskReportTask(params) {
        return http.post(url.handoverTaskReportTask, params)
    },
    // 交班
    handoverTaskSubmitRecord(params) {
        return http.post(url.handoverTaskSubmitRecord, params)
    },
    // 保存
    handoverTaskSaveRecord(params) {
        return http.post(url.handoverTaskSaveRecord, params)
    },
    // 接班
    handoverTaskToConfirm(params) {
        return http.post(url.handoverTaskToConfirm + params.id)
    },
}